﻿<!DOCTYPE html>


<html>


<head>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">

	<link rel="shortcut icon" type="image/png" href="../assets/logo/logo.png"/>
	<link rel="stylesheet" href="styles.css">

	<script type="importmap">
	  {
		"imports": {
			"three": "https://cdn.jsdelivr.net/npm/three@0.178.0/build/three.webgpu.min.js",
			"three/webgpu": "https://cdn.jsdelivr.net/npm/three@0.178.0/build/three.webgpu.min.js",
			"three/tsl": "https://cdn.jsdelivr.net/npm/three@0.178.0/build/three.tsl.min.js",
			"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.178.0/examples/jsm/",
			"tsl-textures": "../dist/tsl-textures.min.js"
		}
	  }
	</script>
</head>


<body>
	
	<script type="module">

import * as THREE from "three";
import { ambientLight, install, light, model, params, scene } from "./online.js";
import { waterDrops } from "tsl-textures";


light.intensity = 10;
ambientLight.intensity = -1;

var gui = install( waterDrops );

model.material.metalness = 0;
model.material.roughness = 0.5;
model.material.transmission = 1;
model.material.ior = 2;
model.material.thickness = 0;
model.material.side = THREE.DoubleSide;



var core = new THREE.Mesh(
	new THREE.SphereGeometry( 0.95 ),
	new THREE.MeshPhysicalMaterial( { color: 'midnightblue' } )
);
scene.add( core );



gui.add( params, 'scale' )
	.name( 'Drops<right>scale</right>' ).min( 0 ).max( 4 )
	.$input.classList.add( 'top' );

gui.add( params, 'density' )
	.name( '<right>density</right>' ).min( 0 ).max( 1 )
	.$input.classList.add( 'bottom' );

gui.add( params, 'bump' )
	.name( '<right>bumpiness</right>' ).min( 0 ).max( 1 )
	.$input.classList.add( 'bottom' );

	</script>
</body>
</html>